<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--
  Created by IntelliJ IDEA.
  User: zhangyading
  Date: 2021/9/29
  Time: 0:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%--指定字符集--%>
    <meta charset="UTF-8">
    <%--使用Edge最新的游览器的渲染方式--%>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <%--
        viewport视口：网页可以根据设置的宽度自动进行适配，在游览器的内部虚拟一个容器，容器的宽度与设备的宽度相同
        width：默认宽度与设备的宽度相同
        initial-scale：初始化的缩放比1:1
    --%>
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>原工列表</title>
    <%--1.导入css的全局格式--%>
    <link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet">
    <%--2.juqery导入--%>
    <script src="${pageContext.request.contextPath}/js/jquery-2.1.0.min.js"></script>
    <%--3.导入bootstrap 的js文件--%>
    <script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
    <style type="text/css">
        td,th {
            text-align: center;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="row">
            <h3 style="">员工列表信息</h3>
            <div class="col-lg-2"></div>
            <div class="col-lg-8">

                <table border="1" class="table table-bordered table-hover">
                    <tr class="success">
                        <th>员工号</th>
                        <th>姓名</th>
                        <th>部门号</th>
                        <th>职位</th>
                        <th>入职方式</th>
                        <th>联系方式</th>
                    </tr>
                    <c:forEach items="${employeeList}" var="employee">
                        <tr>
                            <td>${employee.emp_id}</td>
                            <td>${employee.emp_name}</td>
                            <td>${employee.dept_id}</td>
                            <td>${employee.job_name}</td>
                            <td><fmt:formatDate pattern="yyyy年MM月dd日" value="${employee.join_date}"/></td>
                            <td>${employee.telephone}</td>
                        </tr>
                    </c:forEach>
                    <tr>
                        <td colspan="9" align="center">
                            <a class="btn btn-primary" href="${pageContext.request.contextPath}/add.jsp">添加员工</a>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="col-lg-2"></div>
    </div>
</body>
</html>
